<template>
	<div class="container">
		<Header></Header>
		<div class="main">
			<iframe ref="iframe" id="myframe"  src="https://www.bilibili.com/v/food"></iframe>
		</div>
	</div>
</template>

<script>
// 导入header组件
import Header from '../components/Header.vue'
export default {
  components: {
    Header
  },
  data () {
    return {}
  },
  methods: {},
  mounted () {
	  var url = this.$route.query.url
	  var videoUrl = this.$route.params.videoUrl
	  if (url) {
		  this.$refs.iframe.src = url
	  }
	  if (videoUrl) {
	  		  this.$refs.iframe.src = videoUrl
	  }
  }
}
</script>

<style scoped>
	.container {
		width: 10rem;
		height: 5.625rem;
		margin: 0 auto;
		color: #949292;
		/* background: #100c2a; */
		background-color: #F0F0F0
	}
	.main,iframe{
		width: 100%;
		height: 100%;
	}
</style>
